package com.guangyunl.f_array;
// 概述：数组对称索引位置上的元素互换
public class Demo01Reverse {
    public static void main(String[] args) {
        int[] arr1 = {1, 2, 3, 4, 5, 6, 7};
        for (int min = 0,max = arr1.length-1; min <= max ; min++,max--) {
            int temp = arr1[min];
            arr1[min] = arr1[max];
            arr1[max] = temp;
        }

        for (int i = 0; i < arr1.length; i++) {
            System.out.print(arr1[i] + " ");
        }
    }
}
/*
7 6 5 4 3 2 1
 */